package com.jch.helloworld.configBeans.annotation2.repository;

import com.jch.helloworld.configBeans.annotation2.TestAnnotation2Component;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("demoAnnotation1Repository") // 持久化层 指定bean的名称
public class DemoAnnotation2RepositoryImpl implements DemoAnnotation2Repository {

    @Autowired
    private TestAnnotation2Component component;

    @Override
    public void save() {
        System.out.println("DemoAnnotation2RepositoryImpl save...");
        System.out.println(component);
    }
}
